package com.azure.bigstore.service;

import com.azure.bigstore.entity.Admin;
import com.azure.bigstore.entity.Token;
import com.azure.bigstore.repository.AdminRepository;
import com.azure.bigstore.repository.TokenRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * Created by Azure on 2018/1/23.
 */
@Service
public class TokenService {

    @Autowired
    private TokenRepository tokenRepository;

    public Token findByUID(Long uid){
        return tokenRepository.findByUid(uid);
    }
    public Token findByToken(String tn){
        return tokenRepository.findByToken(tn);
    }
    public Token saveToken(Token token){
        return tokenRepository.save(token);
    }



}
